<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('phpcms','header'); ?>
<!--begin main-->
<div id="main">
  <!--begin left-->
  <div id="main_l">
    <div id="position"><a href="">首页</a><a href="<?php echo $M['url'];?>">问吧</a><?php echo catpos($catid);?></div>
    <div class="tag_menu">
      <ul>
        <li <?php if(!$action) { ?>class="selected"<?php } ?>><a href="<?php echo $M['url'];?>browse.php">全部问题</a></li>
        <li <?php if($action=='solve') { ?>class="selected"<?php } ?>><a href="<?php echo $M['url'];?>browse.php?action=solve">已解决问题</a></li>
        <li <?php if($action=='nosolve') { ?>class="selected"<?php } ?>><a href="<?php echo $M['url'];?>browse.php?action=nosolve">待解决问题</a></li>
        <li <?php if($action=='vote') { ?>class="selected"<?php } ?>><a href="<?php echo $M['url'];?>browse.php?action=vote">投票中问题</a></li>
        <li <?php if($action=='hign') { ?>class="selected"<?php } ?>><a href="<?php echo $M['url'];?>browse.php?action=hign">高分问题</a></li>
        <li><a href="<?php echo $M['url'];?>question.php">我要提问</a></li>
      </ul>
    </div>
<?php if($action=='solve') { ?><?php echo tag('ask', 'tag_ask_list', "SELECT * FROM `zzinfo_ask` WHERE status='5'  ORDER BY askid DESC", 0, 30, array (  'catid' => '0',  'userid' => '',  'flag' => '-1',  'action' => $action,  'urlruleid' => '29',  'class' => 'url',  'target' => '_blank',  'showcatname' => '0',  'titlelen' => '45',));?><?php } elseif ($action=='nosolve') { ?><?php echo tag('ask', 'tag_ask_list', "SELECT * FROM `zzinfo_ask` WHERE status='3'  ORDER BY askid DESC", 0, 30, array (  'catid' => '0',  'userid' => '',  'flag' => '-1',  'action' => $action,  'urlruleid' => '29',  'class' => 'url',  'target' => '_blank',  'showcatname' => '0',  'titlelen' => '46',));?><?php } elseif ($action=='vote') { ?><?php echo tag('ask', 'tag_ask_list', "SELECT * FROM `zzinfo_ask` WHERE status>2  AND flag='1' ORDER BY askid DESC", 0, 10, array (  'catid' => '0',  'userid' => '',  'flag' => '1',  'action' => $action,  'urlruleid' => '29',  'class' => 'url',  'target' => '_blank',  'showcatname' => '0',  'titlelen' => '46',));?><?php } elseif ($action=='hign') { ?><?php echo tag('ask', 'tag_ask_list', "SELECT * FROM `zzinfo_ask` WHERE status>2  AND flag='2' ORDER BY askid DESC", 0, 10, array (  'catid' => '0',  'userid' => '',  'flag' => '2',  'action' => $action,  'urlruleid' => '29',  'class' => 'url',  'target' => '_blank',  'showcatname' => '0',  'titlelen' => '46',));?><?php } else { ?><?php echo tag('ask', 'tag_ask_list', "SELECT * FROM `zzinfo_ask` WHERE status>2  ORDER BY askid DESC", 0, 10, array (  'catid' => '0',  'userid' => '',  'flag' => '-1',  'action' => $action,  'urlruleid' => '29',  'class' => 'url',  'target' => '_blank',  'showcatname' => '0',  'titlelen' => '46',));?><?php } ?>
  </div>
  <!--end left-->
  <!--begin right-->
  <div id="main_r">
    <h4>热点问题</h4>
    <div>
      <ul class="text_list">
       <?php echo tag('ask', 'tag_ask', "SELECT * FROM `zzinfo_ask` WHERE status='3'  ORDER BY hits DESC", 0, 10, array (  'catid' => '0',  'userid' => '',  'flag' => '-1',  'action' => $action,  'urlruleid' => '29',  'class' => 'url',  'target' => '_blank',  'showcatname' => '0',  'titlelen' => '46',));?>
      </ul>
    </div>
    <h4>推荐问题</h4>
    <div class="text_list">
      <ul>
        <?php echo tag('ask', 'tag_ask', "SELECT * FROM `zzinfo_ask` WHERE status='3'  AND catid='$catid' AND flag='3' ORDER BY askid DESC", 0, 10, array (  'catid' => $catid,  'userid' => '',  'flag' => '3',  'action' => $action,  'urlruleid' => '29',  'class' => 'url',  'target' => '_blank',  'showcatname' => '0',  'titlelen' => '46',));?>
      </ul>
    </div>
    <h4 class="tag_box">积分排行<span class="tag_menu_1"><a href="<?php echo $M['url'];?>creditlist.php?action=week" onMouseOver="showContent('0')" id="nav0">上周</a><a href="<?php echo $M['url'];?>creditlist.php?action=month" onMouseOver="showContent('1')" id="nav1">上月</a><a href="<?php echo $M['url'];?>creditlist.php?action=all" onMouseOver="showContent('2')" id="nav2" class="selected">总排行</a></span></h4>
    <div id="content0" style="display:none;">
      <ul class="text_list_1">
  <?php echo tag('ask', 'tag_credit', "SELECT m.userid,m.username,m.preweek AS point,i.lastlogintime,i.logintimes,i.actortype,i.answercount,i.acceptcount FROM `zzinfo_ask_credit` m LEFT JOIN `zzinfo_member_info` i ON m.userid=i.userid ORDER BY preweek DESC", 0, 10, array (  0 => '',  'class' => 'url',  'target' => '_blank',));?>
      </ul>
    </div>
<div id="content1" style="display:none;">
      <ul class="text_list_1">
  <?php echo tag('ask', 'tag_credit', "SELECT m.userid,m.username,m.premonth AS point,i.lastlogintime,i.logintimes,i.actortype,i.answercount,i.acceptcount FROM `zzinfo_ask_credit` m LEFT JOIN `zzinfo_member_info` i ON m.userid=i.userid ORDER BY premonth DESC", 0, 10, array (  0 => '',  'class' => 'url',  'target' => '_blank',));?>
      </ul>
    </div>
<div id="content2">
      <ul class="text_list_1">
  <?php echo tag('ask', 'tag_credit', "SELECT m.userid,m.username,m.point,i.lastlogintime,i.logintimes,i.actortype,i.answercount,i.acceptcount FROM `zzinfo_member` m LEFT JOIN `zzinfo_member_info` i ON m.userid=i.userid ORDER BY point DESC", 0, 10, array (  0 => '',  'class' => 'url',  'target' => '_blank',));?>
      </ul>
    </div>
  </div>
  <!--end right-->
</div>
<script language="JavaScript">
<!--
function showContent(id)
{
for (var i = 0;i < 3;i++)
{
var nav = document.getElementById("nav" + i);
var content = document.getElementById("content" + i);
if (i == id)
{
nav.className = 'selected';
content.style.display = "";
}
else
{
nav.className = '';        
content.style.display = "none";
}
}
}
 //-->
</script>
<!--end main-->
<!--begin foot-->
<?php include template('phpcms','footer'); ?>